<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>用户注册</title>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
    <style>
        body {
            /* background-color: #fafaf8; 页面背景色 */
            background-image: url("{{ url_for('static', filename='pexels-sebastian-189349.jpg') }}"); /* 替换为你的背景图片URL */
            background-size: cover;
            background-position: center;
            background-attachment: fixed;
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh; /* 使内容垂直居中 */
            color: #343a40; /* 字体颜色 */
        }
        .container {
            max-width: 500px; /* 容器最大宽度 */
            margin-top: 100px; /* 上边距 */
            padding: 30px; /* 内边距 */
            background-color: #ffffff; /* 容器背景色 */
            border-radius: 10px; /* 圆角效果 */
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* 阴影效果 */
        }
        h2 {
            text-align: center; /* 标题居中 */
            margin-bottom: 30px; /* 标题下边距 */
        }
        .btn-link {
            display: block; /* 链接按钮块级显示 */
            text-align: center; /* 中心对齐 */
            margin-top: 15px; /* 上边距 */
        }
    </style>
</head>
<body>
    <div class="container">
        <h2>用户注册</h2>
        <form method="POST" class="mt-3">

            <div class="form-group">
                <label for="username">用户名:</label>
                <input type="text" class="form-control" id="username" name="username" placeholder="用户名" required>
            </div>

            <div class="form-group">
                <label for="password">密  码:</label>
                <input type="password" class="form-control" id="password" name="password" placeholder="密码" required>
            </div>

            <div class="form-group">
                <label for="confirm_password">确认密码:</label>
                <input type="password" class="form-control" id="confirm_password" name="confirm_password" placeholder="确认密码" required>
            </div>

            <div class="form-group">
                <label for="user_type">用户类型:</label>
                <select class="form-control" id="user_type" name="user_type">
                    <option value="student">学生</option>
                    <option value="teacher">教师</option>
                </select>
            </div>

            <button type="submit" class="btn btn-primary btn-block">注册</button>
            <a href="{{ url_for('login') }}" class="btn btn-link">返回登录</a>
        </form>
    </div>

    <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
</body>
</html>
